import { State } from './index'
import { GetterTree, Getter } from 'vuex'

const sidebar: Getter<State, any> = (state: State) => state.app.sidebar
const device: Getter<State, any> = (state: State) => state.app.device
const user: Getter<State, any> = (state: State) => state.user
const token: Getter<State, any> = (state: State) => state.user.token
const isGetUser: Getter<State, any> = (state: State) => state.user.isGetUser
const defaultImage: Getter<State, any> = (state: State) => state.app.defaultImage

const getterTree: GetterTree<State, any> = {
  sidebar,
  device,
  user,
  token,
  isGetUser,
  defaultImage,
}

export default getterTree
